﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
//using BTGISWASECO.BusinessEntities;

/// <summary>
/// Summary description for HamVanEntities
/// </summary>
namespace BTGISWASECO.BusinessEntities
{
    public class HamVanEntities
    {
        #region khai bao thuoc tinh
        private int _objectID;
        private string _IDHam;
        private string _IDDMA;
        private string _IDDMZ;      
        private string _TenHam;
        private string _MoTaViTri;
        private string _ChucNang;
        private int _DonViQuanLy;
        private string _DonViQuanLyText;
        private int _ThuocSoHuu;
        private string _ThuocSoHuuText;
        private int _SoLanSuCo;
        private string _NguoiCNCuoi;
        private DateTime _NgayCNCuoi;
        private string _GhiChu;
        private string _IDHinhAnh;


        public string NguoiCNCuoi
        {
            get { return _NguoiCNCuoi; }
            set { _NguoiCNCuoi = value; }
        }


        public DateTime NgayCNCuoi
        {
            get { return _NgayCNCuoi; }
            set { _NgayCNCuoi = value; }
        }


        public string IDDMZ
        {
            get { return _IDDMZ; }
            set { _IDDMZ = value; }
        }

        public string DonViQuanLyText
        {
            get { return _DonViQuanLyText; }
            set { _DonViQuanLyText = value; }
        }


        public string TenHam
        {
            get { return _TenHam; }
            set { _TenHam = value; }
        }

        public string ThuocSoHuuText
        {
            get { return _ThuocSoHuuText; }
            set { _ThuocSoHuuText = value; }
        }

        public string MoTaViTri
        {
            get { return _MoTaViTri; }
            set { _MoTaViTri = value; }
        }


        public string GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }

        public int DonViQuanLy
        {
            get { return _DonViQuanLy; }
            set { _DonViQuanLy = value; }
        }

        public string IDHinhAnh
        {
            get { return _IDHinhAnh; }
            set { _IDHinhAnh = value; }
        }

        public string ChucNang
        {
            get { return _ChucNang; }
            set { _ChucNang = value; }
        }

        public int SoLanSuCo
        {
            get { return _SoLanSuCo; }
            set { _SoLanSuCo = value; }
        }

        public int ThuocSoHuu
        {
            get { return _ThuocSoHuu; }
            set { _ThuocSoHuu = value; }
        }
        
        public int OBJECTID
        {
            get { return _objectID; }
            set { _objectID = value; }
        }

        public string IDHam
        {
            get { return _IDHam; }
            set { _IDHam = value; }
        }

        public string IDDMA
        {
            get { return _IDDMA; }
            set { _IDDMA = value; }
        }


        # endregion khai bao

        #region phuong thuc

        public HamVanEntities()
        {

        }

        public HamVanEntities(string IDHam, string IDDMA,
                            string IDDMZ, string TenHam, string MoTaViTri, string ChucNang,
                            int DonViQuanLy, int ThuocSoHuu, int SoLanSuCo, string NguoiCNCuoi,
                            DateTime NgayCNCuoi, string GhiChu, string IDHinhAnh)
        {
            this._objectID = OBJECTID;
            this._IDHam = IDHam;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._TenHam = TenHam;
            this._MoTaViTri = MoTaViTri;
            this._ChucNang = ChucNang;
            this._DonViQuanLy = DonViQuanLy;
            this._ThuocSoHuu = ThuocSoHuu;
            this._SoLanSuCo = SoLanSuCo;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._IDHinhAnh = IDHinhAnh;
            this._GhiChu = GhiChu;
        }
        public HamVanEntities(int OBJECTID, string IDHam,string IDDMA,
                            string IDDMZ,string TenHam, string MoTaViTri,string ChucNang,
                            int DonViQuanLy,int ThuocSoHuu,int SoLanSuCo, string NguoiCNCuoi,
                            DateTime NgayCNCuoi, string GhiChu,string IDHinhAnh)
        {
            this._objectID = OBJECTID;
            this._IDHam = IDHam;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._TenHam = TenHam;
            this._MoTaViTri = MoTaViTri;
            this._ChucNang = ChucNang;
            this._DonViQuanLy = DonViQuanLy;
            this._ThuocSoHuu = ThuocSoHuu;
            this._SoLanSuCo = SoLanSuCo;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._IDHinhAnh = IDHinhAnh;
            this._GhiChu = GhiChu;
        }

        public HamVanEntities(DataRow row)
        {
            this._objectID = Convert.ToInt32(row["OBJECTID"]);
            this._IDHam = row["IDHam"].ToString();
            this._IDDMZ = row["IDDMZ"].ToString();
            this._IDDMA = row["IDDMA"].ToString();
            this._TenHam = row["TenHam"].ToString();
            this._MoTaViTri = row["MoTaViTri"].ToString();
            this._ChucNang = row["ChucNang"].ToString();
            this._DonViQuanLyText = row["DonViQL"].ToString();
            this._ThuocSoHuuText = row["ThuocSoHuu"].ToString();
            if (row["SoLanSuCo"].ToString() != "Null")
            this._SoLanSuCo = Convert.ToInt32(row["SoLanSuCo"]);
            if (row["NgayCNCuoi"].ToString() != "Null")
                this._NgayCNCuoi = Convert.ToDateTime(row["NgayCNCuoi"]);
            this._NguoiCNCuoi = row["NguoiCNCuoi"].ToString();
            this._GhiChu = row["GhiChu"].ToString();
            this._IDHinhAnh = row["MaTramBom"].ToString();

        }

        #endregion phuong thuc
    }
}